<include file="./VMSTpl/Index/header.html" />
<div class="alert alert-info alert-dismissable" style="margin-top:-20px;{$styles['tips'][0]}">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  <strong>注意!</strong>&nbsp;&nbsp;&nbsp;&nbsp;请在右上方的输入框输入需要修改信息对应的飞机号或者出厂号 </div>
<div class="alert alert-warning alert-dismissable" style="margin-top:-20px;{$styles['tips'][1]}">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  <strong>注意!</strong>&nbsp;&nbsp;&nbsp;&nbsp;{$tips}</div>
<div class="container">
  <h2>{$title}</h2>
  
  <volist name="Tdata" id="data">
    <div style="margin-top:50px; {$styles['box'][1]}">
      <form id="main" method="post"  onSubmit="return check(this);" action="__ROOT__/Admin/changePhoto"  enctype="multipart/form-data">
        <table class="table table-bordered col-md-12 main table-hover" >
          <tbody>
            <tr>
              <td rowspan="4" class="col-md-3">
			  <img id="image" class="img-thumbnail img-responsive" src="{$data['url']}" style="max-height:250px">
              </td>
              <td class="col-md-1">飞机号</td>
              <td class="col-md-2"><input name="no" class="form-control" disabled value="{$data['plane']}" required></td>
              <td class="col-md-1">出厂号码</td>
              <td class="col-md-2"><input type="text" name="man" class="form-control" disabled></td>
              <td class="col-md-1">专业</td>
              <td class="col-md-2"><select name="major" class="form-control" disabled required>
                  <volist name="majors" id="vo">
                  	<if condition="$data['major'] eq $vo['id'] "><option selected value="{$vo['id']}">{$vo['name']}</option>
                    <else /><option  value="{$vo['id']}">{$vo['name']}</option>
                    </if>
                  </volist>
                </select></td>
            </tr>
            <tr>
              <td>照相部位</td>
              <td><select name="place" disabled class="form-control" required>
                  <volist name="photos" id="vo">
                  	<if condition="$data['place'] eq $vo['id'] "><option selected value="{$vo['id']}">{$vo['name']}</option>
                    <else /><option  value="{$vo['id']}">{$vo['name']}</option>
                    </if>
                    
                  </volist>
                  
                </select></td>
                


              <td>工作时机</td>
              <td><select name="wtime" disabled class="form-control" required>
                  <volist name="wtime" id="vo">
                          <if condition="$data['wtime'] eq $vo['id'] "><option selected value="{$vo['id']}">{$vo['name']}</option>
                    <else /><option  value="{$vo['id']}">{$vo['name']}</option>
                    </if>   
       </volist>
                </select></td>
              <td></td>
              <td></td>
            </tr>
            <tr>
              <td>工作人</td>
              <td><input type="text" name="poster" disabled class="form-control" value="{$data['poster']}" required></td>
              <td>复查人</td>
              <td><input type="text" name="checker" disabled class="form-control" value="{$data['checker']}" required></td>
              <td></td>
              <td></td>
            </tr>
            <tr>
              <td>工作日期</td>
              <td><input type="text" name="wdate" disabled class="form-control" value="{$data['wdate']}" required></td>
              <td>照相日期</td>
              <td><input type="text" name="pdate" disabled class="form-control" value="{$data['pdate']}" required></td>
              <td>照相人</td>
              <td><input type="text" name="photor" disabled class="form-control" value="{$data['photor']}" required></td>
            </tr>
          </tbody>
        </table>
        <a type="button" href="__ROOT__/Index/view" class="btn btn-primary btn-lg col-md-offset-5">返回</a>
      </form>
    </div>
  </volist>
</div>

  <script src="__PUBLIC__/js/jquery.min.js">
        </script> 
  <script src="__PUBLIC__/js/bootstrap.min.js">
        </script>   
 </body>
</html>
<style>
.main{
	height:300px;	
	text-align:center; 
}

.main td{
	height:50px;	
}

</style>

<script>
$("document").ready(function(){
	txt = $("select[name='no']").val();
	$.post("__ROOT__/Admin/getMan",{no:txt},
		function (data){
		$("input[name='man']").val(data);
		})
		
	$("select[name='no']").change(function(){
		txt = $("select[name='no']").val();
		$.post("__ROOT__/Admin/getMan",{no:txt},
		function (data){
			$("input[name='man']").val(data);
		})
	})
})

</script>